import request from '@/utils/request'



// 获取收入列表
export function getMyIncomeList() {
  return request({
    url: '/myincome/myincome/getMyIncomeList',
    method: 'get'
  })
}

// 获取总订单数和总收入
export function getTotal() {
  return request({
    url: '/myincome/myincome/getTotal',
    method: 'get'
  })
}

// 获取订单列表
export function getOrderList(data) {
  return request({
    url: '/myincome/myincome/getOrderList',
    method: 'post',
    data: data
  })
}
export function getOrderList2(data) {
  return request({
    url: '/myincome/myincome/getOrderList',
    method: 'post',
    data: data
  })
}
// 获取订单详情
export function getOrderDetails(orderId) {
  return request({
    url: '/myincome/myincome/getOrderDetails',
    method: 'get',
    params: { orderId }
  })
}

const handleTabClick = (tab) => {
  // 根据tab.name筛选不同类型的订单
  fetchOrderList()
}
